// function fibonacci (n) {
//   if (n === 0) return 0
//   if (n === 1) return 1
//   return fibonacci(n - 1) + fibonacci(n - 2)
// }

function fibonacci (n) {
  return fibonacciIter(0, 1, n)
}

function fibonacciIter (a, b, count) {
  if (count === 0) return a
  return fibonacciIter(b, a + b, count - 1)
}
